using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ent.Web.Helper;

public partial class Controls_Menu : System.Web.UI.UserControl
{
    SiteMapMenus eMenuToLoad = SiteMapMenus.NotSet;
    public SiteMapMenus MenuToLoad
    {
        get { return eMenuToLoad; }
        set { eMenuToLoad = value; }
    }
    public Controls_Menu()
    {
        this.PreRender += new EventHandler(Controls_Menu_PreRender);
    }

    void Controls_Menu_PreRender(object sender, EventArgs e)
    {
        menu.DataSource = SiteMapHelper.GetMenuDataSource(eMenuToLoad, Server.MapPath("~"), (Session["LANG"] == null ? "en-US" : Session["LANG"].ToString()));
        menu.DataBind();
    }
}
